﻿<%@ Page Title=" III - Asynchronous Querying" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Asynchronous.aspx.cs" Inherits="yoADO.Asynchronous" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
     III - Asynchronous Querying
    </h2>
    <p>
         The below HTML table is populated using 'System.Data.SqlClient' library from the ADO.net API. It queries the database in the special asynchronous way, where the applicaion program fires a query and continues its work without waiting for the database to return the result. The database processes the query in a different thread and communicates with the main thread by using Wait Hanles. This induces parallelism and is hence efficient. The Wait Counts generated at the top of the page indicates the amount of work done by the application in between the start of query and end of query.
    </p>
    <p>
        <asp:Button ID="Button1" runat="server" Text="Query" 
            onclick="Button1_Click" />

            <br />
        <asp:Label ID="lbl1" runat="server"></asp:Label>
    </p>
</asp:Content>
